Skip to content

chore: Add react-native contract tets.#1149

Merged
kinyoklion merged 11 commits into
mainfrom
rlamb/react-native-contract-tests
Mar 4, 2026
Merged

chore: Add react-native contract tets.#1149
kinyoklion merged 11 commits into
mainfrom
rlamb/react-native-contract-tests

Conversation

@kinyoklion

@kinyoklion kinyoklion commented Mar 4, 2026

Copy link
Copy Markdown
Member

SDK-1762


Note

Cursor Bugbot is generating a summary for commit 968a3f5. Configure here.

@github-actions

github-actions Bot commented Mar 4, 2026

Copy link
Copy Markdown
Contributor

@launchdarkly/js-sdk-common size report
This is the brotli compressed size of the ESM build.
Compressed size: 25566 bytes
Compressed size limit: 26000
Uncompressed size: 125383 bytes

@github-actions

github-actions Bot commented Mar 4, 2026

Copy link
Copy Markdown
Contributor

@launchdarkly/browser size report
This is the brotli compressed size of the ESM build.
Compressed size: 171792 bytes
Compressed size limit: 200000
Uncompressed size: 799857 bytes

@github-actions

github-actions Bot commented Mar 4, 2026

Copy link
Copy Markdown
Contributor

@launchdarkly/js-client-sdk size report
This is the brotli compressed size of the ESM build.
Compressed size: 23889 bytes
Compressed size limit: 25000
Uncompressed size: 82740 bytes

@github-actions

github-actions Bot commented Mar 4, 2026

Copy link
Copy Markdown
Contributor

@launchdarkly/js-client-sdk-common size report
This is the brotli compressed size of the ESM build.
Compressed size: 20031 bytes
Compressed size limit: 24000
Uncompressed size: 104850 bytes

Comment thread .github/workflows/react-native-contract-tests.yml Outdated
Comment thread .github/workflows/react-native-contract-tests.yml Outdated
The android-emulator-runner action executes scripts with /usr/bin/sh,
not bash. The {1..30} brace expansion is a bashism that causes a syntax
error in POSIX sh, which made the script fail immediately. Also adds a
30-minute job timeout to prevent runaway CI jobs.
The android-emulator-runner action runs each line of the script
parameter as a separate /usr/bin/sh -c invocation. Multi-line constructs
like for loops, if/fi blocks, and line continuations cannot work inline.
Moved the entire script to run-ci-contract-tests.sh which is invoked as
a single command.
The release build was spending ~7.5 min in CI building native code for 4
ABIs (arm64-v8a, armeabi-v7a, x86, x86_64) plus running lintVital. Since
the emulator is x86_64, we only need that ABI. Switching to debug build
also skips lintVital and R8/ProGuard (which weren't meaningful anyway as
release was signed with debug keys).

Expected savings: ~3-4 minutes (native builds for 3 unused ABIs + lint).
…de emulator

Debug builds skip JS bundling and expect Metro dev server — the APK
launched with no JavaScript code so it never connected to the WebSocket.

Switched back to assembleRelease with x86_64-only ABI and skipping
lintVital to keep the speed improvement.

Moved log capture into the emulator runner script via a trap on EXIT.
The previous "Print logs" step ran after the emulator was terminated,
causing adb logcat to hang indefinitely.
@kinyoklion kinyoklion marked this pull request as ready for review March 4, 2026 18:49
@kinyoklion kinyoklion requested a review from a team as a code owner March 4, 2026 18:49
Comment thread packages/sdk/react-native/contract-tests/run-contract-tests.sh Outdated
export default function App() {
const [connected, setConnected] = useState(false);

useEffect(() => {

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is slightly amusing.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Comment thread packages/sdk/react-native/contract-tests/adapter/tsconfig.json Outdated

@joker23 joker23 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

some nits

Comment thread packages/sdk/react-native/contract-tests/entity/src/ClientEntity.ts Outdated
Comment thread .github/workflows/react-native-contract-tests.yml Outdated
- Await flush() call in ClientEntity (joker23)
- Pin sdk-test-harness download to v2.34.0 instead of latest (joker23)
@kinyoklion kinyoklion merged commit af793b5 into main Mar 4, 2026
40 of 41 checks passed
@kinyoklion kinyoklion deleted the rlamb/react-native-contract-tests branch March 4, 2026 21:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants